
<div class="rowTableDiv" style="text-align:center;">
	<div class="cellTableDiv leftDivFloat leftTopRadiusDiv  " style="color:#FFFFFF;font-size:14px;margin-left:15px;"> 
		<p class="pCellDiv4 ">
			Operatore {$usrOperatore} : {$usrNominativo}
		</p>
	</div>
	<div class="cellTableDiv leftDivFloat leftTopRadiusDiv  " style="color:#FFFFFF;size:14px;margin-left:15px;"> 
		
			<img src="images/calendar.png" class="radiusDiv shadowDiv" style="width:34px;cursor:pointer;" onClick ="openPopupApp();" onmouseover="showTooltip('Mostra Appuntamenti','1',0)"/>	
		
	</div>

	<!--<div id="lblRegistrazione" class="cellTableDiv leftTopRadiusDiv  " style="color:red;font-size:14px;text-decoration:blink;display:none;"> 	
		<p class="pCellDiv4 ">Registrazione in corso</p>
	</div>-->
	<!--<div class="cellTableDiv widthContent1023 divFloat leftTopRadiusDiv rightTopRadiusDiv leftBottomRadiusDiv rightBottomRadiusDiv lightGreyDiv" > 
		<p class="pCellDiv ">info chiamate</p>
	</div>-->
	<div class="cellTableDiv rightTopRadiusDiv rightDivFloat" > 
		<input type="button" id="idBtnSaveDati" value="Salva Dati" class="buttonNewGreen effectImage radiusButton shadowButton" onclick="saveRaccoltaDati()" style="margin-right:10px;display:none;"/>

		<input type="button" id="btnPronto" value="Pronto" style="margin-right:10px;" class="buttonNewGreen effectImage effectImage radiusButton shadowButton" onclick="_loginConsole()" />
		<input type="button" id="btnRegistra" value="Registra" style="margin-right:10px;display:none;" class="buttonNewRed effectImage effectImage radiusButton shadowButton" onclick="_recordingConsole()" />
		<input type="button" id="btnStop" value="Stop" style="margin-right:10px;display:none;" class="buttonNewRed effectImage effectImage radiusButton shadowButton" onclick="_stopConsole()" />
		<input type="button" id="btnHangup" value="Attacca" style="margin-right:10px;display:none;" class="buttonNewRed effectImage effectImage radiusButton shadowButton" onclick="_hangupConsole()" />
<!-- 		<input type="button" id="btnRegistra" value="Registra" style="margin-right:10px;" class="buttonNewRed effectImage effectImage radiusButton shadowButton" onclick="_recordingConsole()" /> -->
<!-- 		<input type="button" id="btnPausa" value="Pausa" style="margin-right:10px;display:none;" class="buttonNewYellow effectImage effectImage radiusButton shadowButton" onclick="_pausaConsole()" /> -->
	      <input type="button" id="btnRiprendi" value="Riprendi" style="margin-right:10px;display:none;" class="buttonNewGreen effectImage effectImage radiusButton shadowButton" onclick="_riprendiConsole()" />
		<input type="button" id="btnAzzera" value="Azzera Tempo" style="margin-right:10px; display:none;" class="buttonNewGreen effectImage effectImage radiusButton shadowButton" onclick="_azzeraConsole()" />	
		<input type="button" id="btnEsci" value="Esci" style="margin-right:10px;" class="buttonNew3 effectImage effectImage radiusButton shadowButton" onclick="_logoutConsole()" />
	
	</div>
		
	
</div>
<!--<input type="hidden" name="order" id="order" value="{$order}" />
<input type="hidden" name="orderType" id="orderType" value="{$orderType}" />

<input type="hidden" name="idAnagraficaUnicef" value="{$idAnagraficaUnicef}" />
<input type="hidden" name="tipoRecord" value="{$tipoRecord}" />
<input type="hidden" name="codice" value="{$codice}" />
<input type="hidden" name="numeroAdesione" value="{$numeroAdesione}" />
<input type="hidden" name="save" id="save" value="" />
<input type="hidden" name="saveType" id="saveType" value="" />
<input type="hidden" name="idEsito" id="idEsito" value="" />
<input type="hidden" name="saveChiamataExit" value="{$saveChiamataExit}" />-->

<input type="hidden" name="saveConsole" value="{$saveConsole}" />
<input type="hidden" name="loginConsole" value="{$loginConsole}" />
<input type="hidden" name="recordingConsole" value="{$recordingConsole}" />


{include file="funcMisc.js"}
{include file="funcSelect.js"}
<!-- {include file="funcPopup.js"} -->
<script type="text/javascript" src="lib_js/calendar.js"></script>

<!-- {$mezzoPagamentoCod} -->

<script type="text/javascript">

var loginConsole = '{$loginConsole}';
var statusCall = '{$statusCall}';
var recordingConsole = '{$recordingConsole}';

checkConsole();


{literal}

function checkConsole()
{
	if (loginConsole == 'S')
	{
// 		alert ('ready'); 
// 		alert ('registrato alla console');
		document.getElementById("btnPronto").style.display = "none";
// 		$("#btnPausa").fadeIn("slow");
		$("#btnRegistra").fadeIn("slow");
		$("#btnHangup").fadeIn("slow");
		
		$("#idBtnSaveDati").fadeIn("slow");
		if (!document.getElementById("campagnaCheck")) 	startTimerCall();
	}
	else if (loginConsole == 'P')
	{
// 		alert ('pausa');
		document.getElementById("btnPronto").style.display = "none";
		$("#btnRiprendi").fadeIn("slow");
		$("#btnRegistra").fadeIn("slow");
		
		$("#idBtnSaveDati").fadeIn("slow");
		stopTimerCall();
	}
	
	if (statusCall == 'REC')
	{
		document.getElementById("btnRegistra").style.display = "none";
		//$("#lblRegistrazione").fadeIn("slow");
		document.getElementById("divConsole").style.backgroundColor = "red";
		$("#btnStop").fadeIn("slow");
	}
	else if (statusCall == 'STOP')
	{
		//document.getElementById("lblRegistrazione").style.display = "none";
		document.getElementById("divConsole").style.backgroundColor = "#5A6D94";
		document.getElementById("btnStop").style.display = "none";
		$("#btnRegistra").fadeIn("slow");
	}
// 	else if (statusCall == 'HANGUP')
// 	{
// 		document.getElementById("btnStop").style.display = "none";
// 		$("#btnRegistra").fadeIn("slow");
// 	}


}	

function _loginConsole()
{
	//effettuare alla connessione alla console
	_submitLoadConsole('&saveConsole=S');
}

function _pausaConsole()
{
	//metto l'operatore in pausa
	alert('Il tasto pausa non è attivo!');
	return;
	_submitLoadConsole('&saveConsole=P');
}

function _riprendiConsole()
{
	//metto l'operatore in pronto
	_submitLoadConsole('&saveConsole=R');
}

function _recordingConsole()
{
	//richiedo il pod e poi registro
// 	if (document.main.dat_dato_25.value != "")

// 	document.main.recordingConsole.value = 1;
	_submitLoadConsole('&saveConsole=REC&recordingConsole=1');
}

function _stopConsole()
{
// 	document.main.recordingConsole.value = 0;
	_submitLoadConsole('&saveConsole=STOP&recordingConsole=0');
}
function _azzeraConsole()
{
// 	document.main.recordingConsole.value = 0;
	if (document.main.recordingConsole.value == 1)	alert ("interrompere prima la registrazione");
	else _submitLoadConsole('&saveConsole=AZZERA');
}

function _hangupConsole()
{
	if (document.main.recordingConsole.value == 1)	alert ("interrompere prima la registrazione");
	else _submitLoadConsole('&saveConsole=HANGUP');
}


{/literal}


</script>
 
{include file="usrObjPopupMsg.tpl.html"}
 

